package net.zjitc.service.impl;

import net.zjitc.dao.AdminProductDao;
import net.zjitc.dao.impl.AdminProductDaoImpl;
import net.zjitc.pojo.Product;
import net.zjitc.service.AdminProductService;
import net.zjitc.utils.PageBean;

import java.util.List;

/**
 * Created by Administrator on 2017/11/22.
 */
public class AdminProductServiceImpl implements AdminProductService{
    AdminProductDao dao=new AdminProductDaoImpl();
    public PageBean<Product> findPage(int page, int pageSize) {
        return dao.findPage(page,pageSize);
    }

    public int addProduct(Product product) {
        return dao.addProduct(product);
    }

    public Product findByPid(String pid) {
        return dao.findByPid(pid);
    }

    public int editProduct(Product product) {
        return dao.editProduct(product);
    }

    public int deleteProduct(String pid) {
        return dao.deleteProduct(pid);
    }

    public PageBean<Product> findPageBeanByCid(int page, int pageSize, int cid) {
        return dao.findPageBeanByCid(page,pageSize,cid);
    }

    public PageBean<Product> findPageBeanByCsid(int page, int pageSize, int csid) {
        return dao.findPageBeanByCsid(page,pageSize,csid);
    }

    public Product findBYPid(int pid) {
        return dao.findBYPid(pid);
    }

    public List<Product> findHot() {
        return dao.findHot();
    }

    public List<Product> findNew() {
        return dao.findNew();
    }

}
